<%--
  Created by IntelliJ IDEA.
  User: ZengQi
  Date: 2021/11/12 0012
  Time: 11:01
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>文档审核结果</title>

    <link rel="shortcut icon" type="image/x-icon" href="${pageContext.request.contextPath}/favicon.ico"/>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/layui/css/layui.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/common.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/layui/extend/dtree.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/layui/extend/font/dtreefont.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/layui/extend/formSelects-v4.css">

</head>
<body>
<div class="yadmin-body animated fadeIn">
    <form action="" method="post" class="layui-form layui-form-pane">
        <input name="document_id" type="hidden" value=""/>

        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">审核意见</label>
            <div class="layui-input-block">
                <textarea placeholder="暂无审核内容" class="layui-textarea" name="review" id="review">${review}</textarea>
            </div>
        </div>

        <div class="layui-form-item">
            <label for="score" class="layui-form-label">
                评分：
            </label>
            <div id="score" style="margin-left: 20px;"></div>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-block" style="margin-left:0;text-align:center;">
                <div class="layui-btn-container" id="button">
                </div>
            </div>
        </div>


    </form>
</div>

<script src="${pageContext.request.contextPath}/js/jquery.js"></script>
<script src="${pageContext.request.contextPath}/layui/layui.js"></script>
<script src="${pageContext.request.contextPath}/js/common.js"></script>

<script>
    var score = '${score}';
    var roleId = '${user.roleId}';
    var document_id = '${document_id}';
    // 如果是项目经理，则隐蔽审核按钮
    // if(roleId == 2) {
    //     $('#confirm').hide();
    //     $('#update').hide();
    // }
    //如果未审核，则显示提交审核按钮
    if(score == 0 && (roleId==1 || roleId==4)) {
        html = '<button class="layui-btn layui-btn-normal btn-w100" lay-submit="" lay-filter="confirm" id="confirm">提交</button>';
        $('#button').html(html)
    }
    //如果已经审核，则显示更新审核按钮
    else if(score > 0 && (roleId==1 || roleId==4)) {
        html = '<button class="layui-btn layui-btn-normal btn-w100" lay-submit="" lay-filter="confirm" id="confirm">修改</button>'
        $('#button').html(html);
    }
</script>

<script src="${pageContext.request.contextPath}/js/document/checkConfirm.js"></script>

</body>
</html>
